#include<stdio.h>
#include<stdlib.h>
#include<sys/types.h>
#include<sys/stat.h>
#include<unistd.h>

static off_t flen(const char *name)
{
	struct stat statret;
		
	if(stat(name,&statret)<0)
	{

			perror("stat()");
			return -1;
	}
	return statret.st_size;

}
int main(int agrc,char **agrv)
{
	struct stat ret;
	if(agrc<2)
	{
		fprintf(stderr,"input error");
		return -1;
	}
	//ret = flen(agrc[1]);
	printf("size=%ld\n",flen(agrv[1]));	
	return 0;
}
